﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net.Mail;
using System.IO;

namespace Scheduling.Models.Helpers
{
    public class MailHelper
    {
        public static void DumpEmailToTextFile(MailMessage Email, string Path)
        {

            var fileWriter = File.CreateText(Path);
            fileWriter.Write("FROM: " + Email.From + "\r\n");
            fileWriter.Write("TO: " + Email.To + "\r\n");
            fileWriter.Write("BODY: " + Email.Body + "\r\n");
            fileWriter.Flush();
            fileWriter.Close();
        }
    }
}